package com.jxm.jdk8features;

/**
 * @Description:
 * @Author: JXM
 * @Date: 2023-12-25 22:31
 */
public class CompareByData {

    public static int CompareByAge(Student o1, Student o2){
        return o1.getAge() - o2.getAge();
    }

    //降序排序
    public int CompareByAgeDesc(Student o1, Student o2){
        return o2.getAge() - o1.getAge();
    }
}
